import{d as v,a as r,o as a,b as l,w as e,e as o,m as V,f as i,E as h,t as p,W as x,F as S,c as A,U as b,q as g,K as R,D as B,p as z,_ as D}from"./index-c80Lh_is.js";import{A as N}from"./AppCollection-jlsv_00S.js";import{S as L}from"./StatusBadge-UNqSn95Q.js";import{S as I}from"./SummaryView-SP5kl4lM.js";const K=v({__name:"ZoneEgressListView",setup(T){return(Z,$)=>{const y=r("RouteTitle"),u=r("RouterLink"),k=r("KCard"),w=r("RouterView"),_=r("DataSource"),f=r("AppView"),C=r("RouteView");return a(),l(_,{src:"/me"},{default:e(({data:E})=>[E?(a(),l(C,{key:0,name:"zone-egress-list-view",params:{zone:"",zoneEgress:""}},{default:e(({route:n,t:m})=>[o(f,null,{title:e(()=>[V("h2",null,[o(y,{title:m("zone-egresses.routes.items.title")},null,8,["title"])])]),default:e(()=>[i(),o(_,{src:`/zone-cps/${n.params.zone||"*"}/egresses?page=1&size=100`},{default:e(({data:t,error:c})=>[o(k,null,{default:e(()=>[c!==void 0?(a(),l(h,{key:0,error:c},null,8,["error"])):(a(),l(N,{key:1,class:"zone-egress-collection","data-testid":"zone-egress-collection",headers:[{label:"Name",key:"name"},{label:"Address",key:"socketAddress"},{label:"Status",key:"status"},{label:"Details",key:"details",hideLabel:!0}],"page-number":1,"page-size":100,total:t==null?void 0:t.total,items:t==null?void 0:t.items,error:c,"empty-state-message":m("common.emptyState.message",{type:"Zone Egresses"}),"empty-state-cta-to":m("zone-egresses.href.docs"),"empty-state-cta-text":m("common.documentation"),"is-selected-row":s=>s.name===n.params.zoneEgress,onChange:n.update},{name:e(({row:s})=>[o(u,{to:{name:"zone-egress-summary-view",params:{zone:n.params.zone,zoneEgress:s.name},query:{page:1,size:100}}},{default:e(()=>[i(p(s.name),1)]),_:2},1032,["to"])]),socketAddress:e(({row:s})=>[s.zoneEgress.socketAddress.length>0?(a(),l(x,{key:0,text:s.zoneEgress.socketAddress},null,8,["text"])):(a(),A(S,{key:1},[i(p(m("common.collection.none")),1)],64))]),status:e(({row:s})=>[o(L,{status:s.state},null,8,["status"])]),details:e(({row:s})=>[o(u,{class:"details-link","data-testid":"details-link",to:{name:"zone-egress-detail-view",params:{zoneEgress:s.name}}},{default:e(()=>[i(p(m("common.collection.details_link"))+" ",1),o(g(b),{display:"inline-block",decorative:"",size:g(R)},null,8,["size"])]),_:2},1032,["to"])]),_:2},1032,["total","items","error","empty-state-message","empty-state-cta-to","empty-state-cta-text","is-selected-row","onChange"]))]),_:2},1024),i(),n.params.zoneEgress?(a(),l(w,{key:0},{default:e(s=>[o(I,{onClose:d=>n.replace({name:"zone-egress-list-view",params:{zone:n.params.zone},query:{page:1,size:100}})},{default:e(()=>[(a(),l(B(s.Component),{"zone-egress-overview":t==null?void 0:t.items.find(d=>d.name===n.params.zoneEgress)},null,8,["zone-egress-overview"]))]),_:2},1032,["onClose"])]),_:2},1024)):z("",!0)]),_:2},1032,["src"])]),_:2},1024)]),_:1},8,["params"])):z("",!0)]),_:1})}}}),O=D(K,[["__scopeId","data-v-ecf2c484"]]);export{O as default};
